From 8a72d4b3835bcf86ae0334a15618fa09781fdd89 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 18 Sep 2003 19:04:42 +0000 Subject: [PATCH] Call g_closure_unref() to unref a closure, not g_object_unref(). (#122637, 2003-09-18 Matthias Clasen * gtk/gtkaction.c (gtk_action_finalize): Call g_closure_unref() to unref a closure, not g_object_unref(). (#122637, Marco Pesenti Gritti) --- ChangeLog | 11 +++++++---- ChangeLog.pre-2-10 | 11 +++++++---- ChangeLog.pre-2-4 | 11 +++++++---- ChangeLog.pre-2-6 | 11 +++++++---- ChangeLog.pre-2-8 | 11 +++++++---- gtk/gtkaction.c | 3 +-- 6 files changed, 36 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d8a26ab4d..215cccf1b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-09-18 Matthias Clasen + * gtk/gtkaction.c (gtk_action_finalize): Call g_closure_unref() to + unref a closure, not g_object_unref(). (#122637, Marco Pesenti Gritti) + Install accelerators on actions, not on proxies, support accelerator-only actions: @@ -13,10 +16,10 @@ (gtk_action_[dis]connect_accelerator): New functions. * gtk/gtkaction.c (struct _GtkActionPrivate): Add accel_group, - accel_closure and accel_count. We must have a reference to the accel_group, - since we need it in connect_proxy. The count is necessary to ensure - that the accelerator isn't removed before the last proxy requesting - it has been unmerged. + accel_closure and accel_count. We must have a reference to the + accel_group, since we need it in connect_proxy. The count is necessary + to ensure that the accelerator isn't removed before the last proxy + requesting it has been unmerged. (connect_proxy): Connect the accelerator to the action now, only set the accel_path on the menuitem. (remove_proxy): Disconnect the accelerator from the action, not from diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6d8a26ab4d..215cccf1b0 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2003-09-18 Matthias Clasen + * gtk/gtkaction.c (gtk_action_finalize): Call g_closure_unref() to + unref a closure, not g_object_unref(). (#122637, Marco Pesenti Gritti) + Install accelerators on actions, not on proxies, support accelerator-only actions: @@ -13,10 +16,10 @@ (gtk_action_[dis]connect_accelerator): New functions. * gtk/gtkaction.c (struct _GtkActionPrivate): Add accel_group, - accel_closure and accel_count. We must have a reference to the accel_group, - since we need it in connect_proxy. The count is necessary to ensure - that the accelerator isn't removed before the last proxy requesting - it has been unmerged. + accel_closure and accel_count. We must have a reference to the + accel_group, since we need it in connect_proxy. The count is necessary + to ensure that the accelerator isn't removed before the last proxy + requesting it has been unmerged. (connect_proxy): Connect the accelerator to the action now, only set the accel_path on the menuitem. (remove_proxy): Disconnect the accelerator from the action, not from diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 6d8a26ab4d..215cccf1b0 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,5 +1,8 @@ 2003-09-18 Matthias Clasen + * gtk/gtkaction.c (gtk_action_finalize): Call g_closure_unref() to + unref a closure, not g_object_unref(). (#122637, Marco Pesenti Gritti) + Install accelerators on actions, not on proxies, support accelerator-only actions: @@ -13,10 +16,10 @@ (gtk_action_[dis]connect_accelerator): New functions. * gtk/gtkaction.c (struct _GtkActionPrivate): Add accel_group, - accel_closure and accel_count. We must have a reference to the accel_group, - since we need it in connect_proxy. The count is necessary to ensure - that the accelerator isn't removed before the last proxy requesting - it has been unmerged. + accel_closure and accel_count. We must have a reference to the + accel_group, since we need it in connect_proxy. The count is necessary + to ensure that the accelerator isn't removed before the last proxy + requesting it has been unmerged. (connect_proxy): Connect the accelerator to the action now, only set the accel_path on the menuitem. (remove_proxy): Disconnect the accelerator from the action, not from diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6d8a26ab4d..215cccf1b0 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,8 @@ 2003-09-18 Matthias Clasen + * gtk/gtkaction.c (gtk_action_finalize): Call g_closure_unref() to + unref a closure, not g_object_unref(). (#122637, Marco Pesenti Gritti) + Install accelerators on actions, not on proxies, support accelerator-only actions: @@ -13,10 +16,10 @@ (gtk_action_[dis]connect_accelerator): New functions. * gtk/gtkaction.c (struct _GtkActionPrivate): Add accel_group, - accel_closure and accel_count. We must have a reference to the accel_group, - since we need it in connect_proxy. The count is necessary to ensure - that the accelerator isn't removed before the last proxy requesting - it has been unmerged. + accel_closure and accel_count. We must have a reference to the + accel_group, since we need it in connect_proxy. The count is necessary + to ensure that the accelerator isn't removed before the last proxy + requesting it has been unmerged. (connect_proxy): Connect the accelerator to the action now, only set the accel_path on the menuitem. (remove_proxy): Disconnect the accelerator from the action, not from diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6d8a26ab4d..215cccf1b0 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,8 @@ 2003-09-18 Matthias Clasen + * gtk/gtkaction.c (gtk_action_finalize): Call g_closure_unref() to + unref a closure, not g_object_unref(). (#122637, Marco Pesenti Gritti) + Install accelerators on actions, not on proxies, support accelerator-only actions: @@ -13,10 +16,10 @@ (gtk_action_[dis]connect_accelerator): New functions. * gtk/gtkaction.c (struct _GtkActionPrivate): Add accel_group, - accel_closure and accel_count. We must have a reference to the accel_group, - since we need it in connect_proxy. The count is necessary to ensure - that the accelerator isn't removed before the last proxy requesting - it has been unmerged. + accel_closure and accel_count. We must have a reference to the + accel_group, since we need it in connect_proxy. The count is necessary + to ensure that the accelerator isn't removed before the last proxy + requesting it has been unmerged. (connect_proxy): Connect the accelerator to the action now, only set the accel_path on the menuitem. (remove_proxy): Disconnect the accelerator from the action, not from diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index e4d96d88a6..adb3c95244 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -288,7 +288,6 @@ static void gtk_action_finalize (GObject *object) { GtkAction *action; - action = GTK_ACTION (object); g_free (action->private_data->name); @@ -297,7 +296,7 @@ gtk_action_finalize (GObject *object) g_free (action->private_data->tooltip); g_free (action->private_data->stock_id); - g_object_unref (action->private_data->accel_closure); + g_closure_unref (action->private_data->accel_closure); if (action->private_data->accel_group) g_object_unref (action->private_data->accel_group); } -- 2.30.2